package com.moerlong.platform.service.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.moerlong.platform.service.common.utils.R;
import com.moerlong.platform.service.demo.remote.HelloRemote;


@RestController
public class ConsumerController {

    @Autowired
    HelloRemote helloRemote;
	
    @RequestMapping("/common/getConfig")
    public R demo1() {
        return helloRemote.getConfig();
    }
    @RequestMapping("/common/demo2/{name}")
    public R demo2(@PathVariable("name") String name) {
        return helloRemote.demo2(name);
    }
    @RequestMapping("/common/demo3/{name}")
    public R demo3(@PathVariable("name") String name) {
        return helloRemote.demo3(name);
    }
    @RequestMapping("/common/getServices")
    public R getServices() {
        return helloRemote.getServices();
    }

}